package haha.life.normal;


import jzqb.po.MonitorPo;

import java.util.List;

public class ParseMoninorArgsUtil {

    public static List<MonitorPo> ParseOperation(List<MonitorPo> MonitorPoList){

        for (MonitorPo po:MonitorPoList){
            String res = "";
            switch (po.getOperateType()){
                case "新建用户":
                    res = String.format("【用户ID:%s】",po.getArg0());
                    break;
                case "导入用户":
                    res = String.format("【文件路径:%s】",po.getArg0());
                    break;
                case "重置密码":
                    res = String.format("【用户ID:%s】",po.getArg0());
                    break;
                case "删除用户":
                    res = String.format("【用户ID:%s】",po.getArg0());
                    break;
                case "禁言":
                    res = String.format("【用户ID:%s】",po.getArg0());
                    break;
                case "解除禁言":
                    res = String.format("【用户ID:%s】",po.getArg0());
                    break;
                case "新建部门":
                    res = String.format("【部门ID:%s】",po.getArg0());
                    break;
                case "导入部门":
                    res = String.format("【文件路径:%s】",po.getArg0());
                    break;
                case "删除部门":
                    res = String.format("【部门ID:%s】",po.getArg0());
                    break;
                case "新建资源":
                    res = String.format("【"+ po.getArg1()+"：新建资源1条；资源名：%s】",po.getArg0());
                    break;
                case "修改资源":
                    res = String.format("【"+ po.getArg1()+"：修改资源1条；资源名：%s】",po.getArg0());
                    break;
                case "删除资源":
                    res = String.format("【"+ po.getArg1()+"：删除资源1条；资源名：%s】",po.getArg0());
                    break;
                case "导入资源":
                    res = String.format("【"+ po.getArg1()+"：批量导入资源%s",po.getArg0()+"条】");
                    break;
                case "增加分类":
                case "编辑分类":
                case "删除分类":
                    res = String.format("【分类名称:%s】",po.getArg0());
                    break;
                default:
                    res = "";
            }
            po.setDesc(res);
        }
        return MonitorPoList;
    }
}
